<?php
$width=35;
$height=35;

$image=imagecreate($width,$height);

$color_white=imagecolorallocate($image,255,255,255);//白色
$color_blue=imagecolorallocate($image,0,0,108);//蓝色
imagefill($image,0,0,$color_blue);

imagesetthickness($image,3);
imageline($image,0,0,$width,$height ,$color_white);
imageline($image,$width,0,0,$height ,$color_white);
//发送对象至头
header('content-type:image/gif');
imagepng($image);
    /*
    //发送对象至文件
    $filename="ex1.png";
    imagepng($image,$filename);
    */
//销毁对象
imagedestroy($image);
?>